This invention relates to a method for Abstract Syntax Notation One (ASN.1) encoding/decoding systems. This invention can directly process a new format data in an input file for encoding or decoding ANS.1 data. The original encoding/decoding program does not need to be updated.
Due to wide uses of computers, quick growth of Internet and many new technologies on the World Wide Web (WWW), Internet becomes the largest media for information exchanging and commercial marketing. It also causes the emerging of e-business that utilizes computers and Internet technologies to automatically conduct commercial transactions. It can be viewed as an extension of electronic data interchange (EDT) and value added networks. ED is referred to data exchange between companies for their business or trading. These data can trigger a sequence of processes in various information systems manufacture systems or business systems of various companies. In other words an application in a computer sends data to another application system in another computer via pre-agreed protocol standards and data formats through electronic media. Furthermore, a computer can automatically “understand”, “process” and “reply” this data so that a company can increase efficiency, productivity and reduce costs to improve its profits and competitiveness.
One of the existing data format standard used for EDI network management is Abstract Syntax Notation One (ASN.1). The purpose of ASN.1 is to provide an uniformed syntax structure for computer languages among different machines. ASN.1 defines a set of standard methods to describe data structure for various types of in formation so that information can be presented in the same way. Corresponding to ASN.1, there is a set of data encoding rule called Basic Encoding Rule (BER), which is a specified encoding scheme in order to interchange the ASN.1 data structure between computer networks. BER has two parts: part one describes data contents, date types and sequence formats; another part describes how to assemble different pieces of data into a message. ASN.1 encoding/decoding method has been widely used in many areas, such as, encrypted data delivery, electronic identification, communication data exchanges, etc. Since Internet already became very popular, the need for data security has increased. The information that is encoded in ASN.1 format also becomes very popular. However, it is very cumbersome to modify the ASN.1 encoding/decoding computer programs designed for a particular ASN.1 data format to process other ASN.1 data formats. Thus, another type of data structure exchange tool called “XML” has been created. XML does not allow changing data structures, thus the encoding/decoding program becomes simple and easy. However, the trade of simplify a convenience of programming, it also creates other inconvenience. Comparing with ASN.1, XML has the following shortcomings: (1). Too much overhead for data interchanged: for the same information that XML will send five times more data than ASN.1 does. (2). Encryption agreement not yet finalized: XML has more chances to be intruded and damaged than ASN.1 does. Thus, XML requires more dedicated planning for security. (3). Spend too much time for transforming data into particular data structures: XML transfers data via a commonly known and recognized encoding scheme where computers need to conduct a data-transforming step when XML data is received or sent. Thus, if an ASN.1 encoding/decoding system can become easy to use and increase the delivery schemes for optional data formats. It would greatly increase the convenience of commercial and network transmission.
The traditional ASN.1 encoding/decoding method requires modifying its encoding/decoding program every time it encounters a new ASN.1 data format. Usually, it uses a pre-processor or a program generator to meet particular requirements of a data format. The modification of the pre-processor or a program generator to accept a new data format is very time consuming and cumbersome. FIG. 1 depicts a flow diagram of a conventional method. As shown in FIG. 1, depending on ASN.1 data format, it needs modify program via a pre-processor or a program generator to satisfy a particular data format. The flows are as follows: (1). Updating data definition. (2). Executing program generator. (3). Redoing encoding or decoding. (4). Applying new function.
In the conventional method, an input of the ASN.1 data format modification program is not a text file. It is a sequence of digital serial octet data, which may contain other imbedded digital data. Thus, this data is formed as a tree structure. When a digital data contains more imbedded digital data, the depth of this tree also becomes deeper. In order to convert back to its original form, an input data must be based on its tree structure and completely expanded into a sequence of digital data, and then fed to the input of a program again.
Every node in a tree structure represents a sequence of digital data. A program for modifying ASN.1 data format uses one of pairing methods: preorder, inorder or postorder, to expand a digital data at each node. Eventually, a sequence of digital data is formed and becomes input data. When the number of nodes becomes bigger, the ASN.1 encoding/decoding system also generates more programming code and becomes more complicated.
To convert a long sequence of input data back to its original table, a conventional modified program for ASN.1 data format must look up various reference tables. It needs to find out the corresponding portion between input sequence and a reference table, then convert a long sequence data back to the original table and the contents of the original table. If the original tables are not the same, the conventional method mist modify its program to fit a particular format of ASN.1 data. A pre-processor or a program generator needs also to be modified. This is quite complicated and slow process.
Because a conventional program for ASN.1 needs to be modified, thus, data need to be encoded or decoded again and then executed with new function. This invention will overcome the drawbacks of the conventional ASN.1 encoding/decoding systems.